<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
			if(window.localStorage) {
				console.log("浏览支持localStorage")
			} else {
				console.log("浏览暂不支持localStorage")
			}
			//或者
			if(typeof window.localStorage == 'undefined') {
				console.log("浏览暂不支持localStorage")
			}
		</script>
	</body>

</html>